package com.vtb.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.vtb.base.VtbBaseServlet;

@SuppressWarnings("serial")
public class ErrorServlet extends VtbBaseServlet {

	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		String error_code = request.getParameter("err_code");
		String errorMsg = null;
		if (error_code.equals("1000")) {
			errorMsg="开启同步失败,请重试或联系网页底部管理员！";
		}
		if (error_code.equals("1001")) {
			errorMsg="关闭同步失败,请重试或联系网页底部管理员！";
		}
		if (error_code.equals("1002")) {
			errorMsg="授权登陆失败,请重试或联系网页底部管理员！";
		}
		if (error_code.equals("1003")) {
			errorMsg="session已过期,请重新登陆,您需要在两分钟内完成开启同步！";
		}
		if (error_code.equals("1004")) {
			errorMsg="操作失败,可能由于操作时间过长,请重试！";
		}
		if (error_code.equals("1005")) {
		    errorMsg="系统中存在此账户,但未被关联！";
		}
		request.setAttribute("errorMsg", errorMsg);
		request.getRequestDispatcher("").forward(request, response);
	}

}
